use std::path::Path;
use pdf2image::{PDF, RenderOptionsBuilder};

/// pdf转图片
fn main() {
    let path = Path::new("input.pdf");
    let pdf = PDF::from_file(path).unwrap();
    let pages = pdf.render(
        pdf2image::Pages::Range(1..=1),
        RenderOptionsBuilder::default().build().unwrap(),
    );
    println!("{:?}", pages.unwrap().len());
}